package edu.njfu.activitybootmode

import java.lang.StringBuilder

fun main() {
    val fruits= listOf<String>("Apple","Banana","Orange","Pear","Grape")
//    var result= with(StringBuilder()){
////        append("水果列表：\n")
////        for(fruit in fruits) {
////            append(fruit).append("\n")
////        }
////        append("开始吃水果！")
////        toString()
////    }
//    val result=StringBuilder().run{
////        append("水果列表：\n")
////        for(fruit in fruits) {
////            append(fruit).append("\n")
////        }
////        append("开始吃水果！")
////        toString()
////    }
     val result=StringBuffer().apply{
         append("水果列表：\n")
         for(fruit in fruits) {
            append(fruit).append("\n")
         }
         append("开始吃水果！")
     }
    println(result.toString())
    println(Md5Util.stringToMd5("123456"))
}